package com.mybatisplus.mp.controller;

import com.mybatisplus.mp.mapper.UserMapper;
import com.mybatisplus.mp.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
public class UserXmlTest {
    @Autowired
    UserMapper userMapper;

    @PostMapping("/xmlTest")
    public List<User> find(@RequestBody Integer[] ids) {
        List<Integer> integers = Arrays.asList(ids);
        Map<String, Object> map = new HashMap<>();
        map.put("ids",integers);

        System.out.println(ids);
        return userMapper.findTest(map);
    }
}
